package com.kaibes.module.account.listener;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.kaibes.module.account.core.AccountService;
import com.kaibes.module.user.UserService;
import com.kaibes.orm.spring.OrmListener;
import com.kaibes.orm.spring.jdbc.DeleteListenerWithId;

@OrmListener(service = UserService.class)
public class UserDeleteListener4Account extends DeleteListenerWithId<UserService> {

    @Autowired
    private AccountService accountService;
    
    @Override
    protected void afterDelete(List<Object> idList) throws Exception {
        accountService.removeByUserId(idList);
    }
    
}
